package com.atguigu.self.gulimall.product.service;

import com.atguigu.self.gulimall.product.entity.BrandEntity;
import com.atguigu.self.gulimall.product.vo.BrandVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.self.common.utils.PageUtils;
import com.atguigu.self.gulimall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author lixinyang
 * @email lixinyang@gmail.com
 * @date 2021-02-06 14:29:44
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存关联关系
     *
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    /**
     * 根据品牌id更新品牌名称
     *
     * @param brandId
     * @param name
     */
    void updateBrand(Long brandId, String name);

    /**
     * 根据分类id更新分类名称
     *
     * @param catId
     * @param name
     */
    void updateCategory(Long catId, String name);

    List<BrandEntity> getBrandsByCatId(Long catId);
}

